/**
 * @ProjectName:schoolbus
 * @FileName: DriverLogServiceImpl.java
 * @PackageName: edu.xpu.project.log.service
 * @Company:北京有生博大软件有限公司（西安分公司）
 * @Copyright (c) 2017,RiseSoft  All Rights Reserved.
 * @date 2017年5月26日 下午1:35:40
 */
package edu.xpu.project.log.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import edu.xpu.project.log.entity.DriverLog;
import edu.xpu.project.log.repository.DriverLogRepository;

/**
 * @ClassName: DriverLogServiceImpl.java
 * @Description: TODO
 *
 * @author liukang
 * @date 2017年5月26日 下午1:35:40
 * @version 
 * @since JDK 1.6
 */
@Service
@Transactional(readOnly=true)
public class DriverLogServiceImpl implements DriverLogService {
	@Autowired
	private DriverLogRepository driverLogRepository;

	@Override
	public DriverLog get(Long id) {
		return driverLogRepository.findOne(id);
	}

	@Transactional(readOnly=false)
	@Override
	public DriverLog saveOrUpdate(DriverLog t) {
		DriverLog saveAndFlush = driverLogRepository.saveAndFlush(t);
		return saveAndFlush;
	}

	@Transactional(readOnly=false)
	@Override
	public void delete(Long id) {
		driverLogRepository.delete(id);
	}

}

